
{include file="public/meta" /}
    

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>更换logo</h5>
                    <div class="ibox-tools">
                        <a class="link">
                            <b>
                                <i class="layui-icon layui-icon-refresh"></i>
                            </b>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="layui-card">
                        <div class="layui-card-header">注意事项</div>
                        <div class="layui-card-body">
                            1 仅能上传图片格式<br>
                            2 图片大小请控制在500 KB以内<br>
                            当前LOGO<br>
                            <img src=__STATIC__/../logo/{$img.value} width="100px" height="100px">
                        </div>
                    </div>
                    <div class="layui-upload">
                        <div class="layui-upload">
                            <button type="button" class="layui-btn layui-btn-normal" id="test8">选择文件</button>
                            <button type="button" class="layui-btn" id="test9">开始上传</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    layui.use('upload', function() {
        var $ = layui.jquery
            , upload = layui.upload;
        //选完文件后不自动上传
        upload.render({
            elem: '#test8'
            ,url: '{:url(\'api/upload/change_logo\')}' //改成您自己的上传接口
            ,auto: false
            ,multiple: true
            ,size: 500
            ,bindAction: '#test9'
            ,done: function(res){
                var index = layer.load();
                if(res.status == 500) {
                    layer.close(index);
                    layer.open({
                        title: '更换logo'
                        ,content: res.message
                    });
                }else if(res.status == 200) {
                    layer.close(index);
                    layer.open({
                        title: '更换logo'
                        ,content: res.message
                    });
                }
            }
        });
    });
</script>
    <!-- 全局js -->
    {include file="public/footer" /}
</body>

</html>
